package hu.bme.mit.androtext.androgui.serializer;

import com.google.inject.Inject;
import com.google.inject.Provider;
import hu.bme.mit.androtext.androgui.androGuiDsl.AbsoluteLayout;
import hu.bme.mit.androtext.androgui.androGuiDsl.AndroGuiDslPackage;
import hu.bme.mit.androtext.androgui.androGuiDsl.AndroGuiModelRoot;
import hu.bme.mit.androtext.androgui.androGuiDsl.Button;
import hu.bme.mit.androtext.androgui.androGuiDsl.CheckBox;
import hu.bme.mit.androtext.androgui.androGuiDsl.EditText;
import hu.bme.mit.androtext.androgui.androGuiDsl.FrameLayout;
import hu.bme.mit.androtext.androgui.androGuiDsl.LinearLayout;
import hu.bme.mit.androtext.androgui.androGuiDsl.ListView;
import hu.bme.mit.androtext.androgui.androGuiDsl.PreferenceScreen;
import hu.bme.mit.androtext.androgui.androGuiDsl.RadioButton;
import hu.bme.mit.androtext.androgui.androGuiDsl.RadioGroup;
import hu.bme.mit.androtext.androgui.androGuiDsl.RatingBar;
import hu.bme.mit.androtext.androgui.androGuiDsl.RelativeLayout;
import hu.bme.mit.androtext.androgui.androGuiDsl.Spinner;
import hu.bme.mit.androtext.androgui.androGuiDsl.TextView;
import hu.bme.mit.androtext.androgui.androGuiDsl.ToggleButton;
import hu.bme.mit.androtext.androgui.services.AndroGuiDslGrammarAccess;
import hu.bme.mit.androtext.common.commons.CommonsPackage;
import hu.bme.mit.androtext.common.commons.Import;
import hu.bme.mit.androtext.common.serializer.CommonsSemanticSequencer;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.serializer.acceptor.ISemanticSequenceAcceptor;
import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
import org.eclipse.xtext.serializer.diagnostic.ISemanticSequencerDiagnosticProvider;
import org.eclipse.xtext.serializer.diagnostic.ISerializationDiagnostic.Acceptor;
import org.eclipse.xtext.serializer.sequencer.AbstractSemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.GenericSequencer;
import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider;
import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService;
import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;

@SuppressWarnings("restriction")
public class AbstractAndroGuiDslSemanticSequencer extends AbstractSemanticSequencer {

	@Inject
	protected AndroGuiDslGrammarAccess grammarAccess;
	
	@Inject
	protected ISemanticSequencerDiagnosticProvider diagnosticProvider;
	
	@Inject
	protected ITransientValueService transientValues;
	
	@Inject
	@GenericSequencer
	protected Provider<ISemanticSequencer> genericSequencerProvider;
	
	protected ISemanticSequencer genericSequencer;
	
	@Inject
	protected Provider<CommonsSemanticSequencer> superSequencerProvider;
	 
	protected CommonsSemanticSequencer superSequencer; 
	
	@Override
	public void init(ISemanticSequencer sequencer, ISemanticSequenceAcceptor sequenceAcceptor, Acceptor errorAcceptor) {
		super.init(sequencer, sequenceAcceptor, errorAcceptor);
		this.genericSequencer = genericSequencerProvider.get();
		this.genericSequencer.init(sequencer, sequenceAcceptor, errorAcceptor);
		this.superSequencer = superSequencerProvider.get();
		this.superSequencer.init(sequencer, sequenceAcceptor, errorAcceptor); 
	}
	
	public void createSequence(EObject context, EObject semanticObject) {
		if(semanticObject.eClass().getEPackage() == AndroGuiDslPackage.eINSTANCE) switch(semanticObject.eClass().getClassifierID()) {
			case AndroGuiDslPackage.ABSOLUTE_LAYOUT:
				if(context == grammarAccess.getAbsoluteLayoutRule() ||
				   context == grammarAccess.getBaseLayoutRule() ||
				   context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getRootLayoutRule() ||
				   context == grammarAccess.getUIElementRule()) {
					sequence_AbsoluteLayout(context, (AbsoluteLayout) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.ANDRO_GUI_MODEL_ROOT:
				if(context == grammarAccess.getAndroGuiModelRootRule()) {
					sequence_AndroGuiModelRoot(context, (AndroGuiModelRoot) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.BUTTON:
				if(context == grammarAccess.getButtonRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_Button(context, (Button) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.CHECK_BOX:
				if(context == grammarAccess.getCheckBoxRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_CheckBox(context, (CheckBox) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.EDIT_TEXT:
				if(context == grammarAccess.getEditTextRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_EditText(context, (EditText) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.FRAME_LAYOUT:
				if(context == grammarAccess.getBaseLayoutRule() ||
				   context == grammarAccess.getFrameLayoutRule() ||
				   context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getRootLayoutRule() ||
				   context == grammarAccess.getUIElementRule()) {
					sequence_FrameLayout(context, (FrameLayout) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.LINEAR_LAYOUT:
				if(context == grammarAccess.getBaseLayoutRule() ||
				   context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getLinearLayoutRule() ||
				   context == grammarAccess.getRootLayoutRule() ||
				   context == grammarAccess.getUIElementRule()) {
					sequence_LinearLayout(context, (LinearLayout) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.LIST_VIEW:
				if(context == grammarAccess.getListViewRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_ListView(context, (ListView) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.PREFERENCE_SCREEN:
				if(context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getPreferenceScreenRule() ||
				   context == grammarAccess.getRootLayoutRule() ||
				   context == grammarAccess.getUIElementRule()) {
					sequence_PreferenceScreen(context, (PreferenceScreen) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.RADIO_BUTTON:
				if(context == grammarAccess.getRadioButtonRule()) {
					sequence_RadioButton(context, (RadioButton) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.RADIO_GROUP:
				if(context == grammarAccess.getRadioGroupRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_RadioGroup(context, (RadioGroup) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.RATING_BAR:
				if(context == grammarAccess.getRatingBarRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_RatingBar(context, (RatingBar) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.RELATIVE_LAYOUT:
				if(context == grammarAccess.getBaseLayoutRule() ||
				   context == grammarAccess.getLayoutRule() ||
				   context == grammarAccess.getRelativeLayoutRule() ||
				   context == grammarAccess.getRootLayoutRule() ||
				   context == grammarAccess.getUIElementRule()) {
					sequence_RelativeLayout(context, (RelativeLayout) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.SPINNER:
				if(context == grammarAccess.getSpinnerRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_Spinner(context, (Spinner) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.TEXT_VIEW:
				if(context == grammarAccess.getTextViewRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_TextView(context, (TextView) semanticObject); 
					return; 
				}
				else break;
			case AndroGuiDslPackage.TOGGLE_BUTTON:
				if(context == grammarAccess.getToggleButtonRule() ||
				   context == grammarAccess.getUIElementRule() ||
				   context == grammarAccess.getWidgetRule()) {
					sequence_ToggleButton(context, (ToggleButton) semanticObject); 
					return; 
				}
				else break;
			}
		else if(semanticObject.eClass().getEPackage() == CommonsPackage.eINSTANCE) switch(semanticObject.eClass().getClassifierID()) {
			case CommonsPackage.IMPORT:
				if(context == grammarAccess.getImportRule()) {
					sequence_Import(context, (Import) semanticObject); 
					return; 
				}
				else break;
			}
		if (errorAcceptor != null) errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
	}
	
	/**
	 * Constraint:
	 *     (name=ID layoutStyle=LayoutStyle elements+=UIElement*)
	 */
	protected void sequence_AbsoluteLayout(EObject context, AbsoluteLayout semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=QualifiedName imports+=Import* rootLayout+=RootLayout*)
	 */
	protected void sequence_AndroGuiModelRoot(EObject context, AndroGuiModelRoot semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID text=STRING layoutStyle=LayoutStyle)
	 */
	protected void sequence_Button(EObject context, Button semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.BUTTON__TEXT) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.BUTTON__TEXT));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getButtonAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getButtonAccess().getTextSTRINGTerminalRuleCall_2_0(), semanticObject.getText());
		feeder.accept(grammarAccess.getButtonAccess().getLayoutStyleLayoutStyleEnumRuleCall_3_0(), semanticObject.getLayoutStyle());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID text=STRING entries=[ArrayResource|QualifiedName] layoutStyle=LayoutStyle)
	 */
	protected void sequence_CheckBox(EObject context, CheckBox semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.CHECK_BOX__TEXT) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.CHECK_BOX__TEXT));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.CHECK_BOX__ENTRIES) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.CHECK_BOX__ENTRIES));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getCheckBoxAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getCheckBoxAccess().getTextSTRINGTerminalRuleCall_2_0(), semanticObject.getText());
		feeder.accept(grammarAccess.getCheckBoxAccess().getEntriesArrayResourceQualifiedNameParserRuleCall_3_0_1(), semanticObject.getEntries());
		feeder.accept(grammarAccess.getCheckBoxAccess().getLayoutStyleLayoutStyleEnumRuleCall_4_0(), semanticObject.getLayoutStyle());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID text=STRING layoutStyle=LayoutStyle)
	 */
	protected void sequence_EditText(EObject context, EditText semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.EDIT_TEXT__TEXT) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.EDIT_TEXT__TEXT));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getEditTextAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getEditTextAccess().getTextSTRINGTerminalRuleCall_2_0(), semanticObject.getText());
		feeder.accept(grammarAccess.getEditTextAccess().getLayoutStyleLayoutStyleEnumRuleCall_3_0(), semanticObject.getLayoutStyle());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID layoutStyle=LayoutStyle elements+=UIElement*)
	 */
	protected void sequence_FrameLayout(EObject context, FrameLayout semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     importedNamespace=QualifiedNameWithWildCard
	 */
	protected void sequence_Import(EObject context, Import semanticObject) {
		superSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID orientation?='horizontal'? layoutStyle=LayoutStyle elements+=UIElement*)
	 */
	protected void sequence_LinearLayout(EObject context, LinearLayout semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID layoutStyle=LayoutStyle entries=[ArrayResource|QualifiedName]? layout=[Layout|QualifiedName]?)
	 */
	protected void sequence_ListView(EObject context, ListView semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID title=STRING)
	 */
	protected void sequence_PreferenceScreen(EObject context, PreferenceScreen semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.ROOT_LAYOUT__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.ROOT_LAYOUT__NAME));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.PREFERENCE_SCREEN__TITLE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.PREFERENCE_SCREEN__TITLE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getPreferenceScreenAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getPreferenceScreenAccess().getTitleSTRINGTerminalRuleCall_2_0(), semanticObject.getTitle());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID text=STRING layoutStyle=LayoutStyle)
	 */
	protected void sequence_RadioButton(EObject context, RadioButton semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.RADIO_BUTTON__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.RADIO_BUTTON__NAME));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.RADIO_BUTTON__TEXT) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.RADIO_BUTTON__TEXT));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.RADIO_BUTTON__LAYOUT_STYLE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.RADIO_BUTTON__LAYOUT_STYLE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getRadioButtonAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getRadioButtonAccess().getTextSTRINGTerminalRuleCall_2_0(), semanticObject.getText());
		feeder.accept(grammarAccess.getRadioButtonAccess().getLayoutStyleLayoutStyleEnumRuleCall_3_0(), semanticObject.getLayoutStyle());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID orientation?='horizontal'? layoutStyle=LayoutStyle radiobuttons+=RadioButton+)
	 */
	protected void sequence_RadioGroup(EObject context, RadioGroup semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID numStars=INT layoutStyle=LayoutStyle)
	 */
	protected void sequence_RatingBar(EObject context, RatingBar semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.RATING_BAR__NUM_STARS) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.RATING_BAR__NUM_STARS));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getRatingBarAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getRatingBarAccess().getNumStarsINTTerminalRuleCall_2_0(), semanticObject.getNumStars());
		feeder.accept(grammarAccess.getRatingBarAccess().getLayoutStyleLayoutStyleEnumRuleCall_3_0(), semanticObject.getLayoutStyle());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID layoutStyle=LayoutStyle elements+=UIElement*)
	 */
	protected void sequence_RelativeLayout(EObject context, RelativeLayout semanticObject) {
		genericSequencer.createSequence(context, semanticObject);
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID layoutStyle=LayoutStyle)
	 */
	protected void sequence_Spinner(EObject context, Spinner semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getSpinnerAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getSpinnerAccess().getLayoutStyleLayoutStyleEnumRuleCall_2_0(), semanticObject.getLayoutStyle());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID text=STRING layoutStyle=LayoutStyle)
	 */
	protected void sequence_TextView(EObject context, TextView semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.TEXT_VIEW__TEXT) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.TEXT_VIEW__TEXT));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getTextViewAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getTextViewAccess().getTextSTRINGTerminalRuleCall_2_0(), semanticObject.getText());
		feeder.accept(grammarAccess.getTextViewAccess().getLayoutStyleLayoutStyleEnumRuleCall_3_0(), semanticObject.getLayoutStyle());
		feeder.finish();
	}
	
	
	/**
	 * Constraint:
	 *     (name=ID textOn=STRING textOff=STRING layoutStyle=LayoutStyle)
	 */
	protected void sequence_ToggleButton(EObject context, ToggleButton semanticObject) {
		if(errorAcceptor != null) {
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__NAME));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.WIDGET__LAYOUT_STYLE));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.TOGGLE_BUTTON__TEXT_ON) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.TOGGLE_BUTTON__TEXT_ON));
			if(transientValues.isValueTransient(semanticObject, AndroGuiDslPackage.Literals.TOGGLE_BUTTON__TEXT_OFF) == ValueTransient.YES)
				errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, AndroGuiDslPackage.Literals.TOGGLE_BUTTON__TEXT_OFF));
		}
		INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
		SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
		feeder.accept(grammarAccess.getToggleButtonAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
		feeder.accept(grammarAccess.getToggleButtonAccess().getTextOnSTRINGTerminalRuleCall_3_0(), semanticObject.getTextOn());
		feeder.accept(grammarAccess.getToggleButtonAccess().getTextOffSTRINGTerminalRuleCall_5_0(), semanticObject.getTextOff());
		feeder.accept(grammarAccess.getToggleButtonAccess().getLayoutStyleLayoutStyleEnumRuleCall_6_0(), semanticObject.getLayoutStyle());
		feeder.finish();
	}
}
